__global__ void translatePoints(point_list* d_finalVoters, centroid_list* finalCentroids)
{
	int index = (blockIdx.x * blockDim.x + threadIdx.x); 
	int centroidIndex = d_finalVoters[index].centroidIndex;
	
	// some indices in this array could have a vote for -1
	// this indicates that the value stored here doesn't belong
	// to any centroid
	if(d_finalVoters[index].centroidIndex != -1)
	{
		d_finalVoters[index].point.x -= d_finalCentroids[centroidIndex].meanCentroid.x;
		d_finalVoters[index].point.y -= d_finalCentroids[centroidIndex].meanCentroid.y;
		d_finalVoters[index].point.z -= d_finalCentroids[centroidIndex].meanCentroid.z;
	}
}
